package com.my.attendance.service;

import com.my.attendance.dao.DepartmentDao;
import com.my.attendance.entity.Department;

import java.util.List;

public class DepartmentService {
private DepartmentDao departmentDao=new DepartmentDao();

    public List<Department> getDepartmentList() throws Exception {
        List<Department> departmentList = departmentDao.getDepartmentList();
        return departmentList;
    }

    public Department getDepartment(int department_number) throws Exception {
        Department department = departmentDao.getDepartment(department_number);
        return department;
    }

    public int updateDepartment(int employee_number, int department_number) throws Exception {
        int i = departmentDao.updateDepartment(employee_number,department_number);
        return i;
    }
}
